<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no" />
	<meta content="yes" name="apple-mobile-web-app-capable" />
	<meta content="black" name="apple-mobile-web-app-status-bar-style">
	<meta content="telephone=no" name="format-detection" />
	<meta content="emai=no" name="format-detection" />
	<link rel="stylesheet" type="text/css" href="/css/common.css" />
	<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
	<title>微课报名</title>
	<style>
		.wrapper {
			position: relative;
			max-width: 768px;
			margin: 0 auto;
		}

			.wrapper img {
				display: block;
				width: 100%;
			}

				.wrapper img.arrow {
					position: absolute;
					width: 10%;
					left: 68.8%;
					top: 69.5%;
					-moz-animation: moving 1s linear infinite;
					-o-animation: moving 1s linear infinite;
					-webkit-animation: moving 1s linear infinite;
					animation: moving 1s linear infinite;
				}

			.wrapper a {
				display: block;
				bottom: 18%;
				position: absolute;
				width: 48.6%;
				left: 25.7%;
			}

				.wrapper a img:last-child, .wrapper a.active img:first-child {
					display: none;
				}

				.wrapper a img:first-child, .wrapper a.active img:last-child {
					display: block;
				}

		.popup-wrapper {
			display: block;
		}

			.popup-wrapper .popup-bg {
				background-color: rgba(0,0,0,0.60);
			}

		.popup-layout {
			background-color: transparent;
			top: 2%;
			left: 0;
			width: 100%;
		}

			.popup-layout img {
				width: 100%;
			}

		@keyframes moving {
			from {
				margin: -5px 0 0 5px;
			}

			to {
				margin: 5px 0 0 -5px;
			}
		}

		@-moz-keyframes moving {
			from {
				margin: -5px 0 0 5px;
			}

			to {
				margin: 5px 0 0 -5px;
			}
		}

		@-webkit-keyframes moving {
			from {
				margin: -5px 0 0 5px;
			}

			to {
				margin: 5px 0 0 -5px;
			}
		}
	</style>
	<script>
	var _hmt = _hmt || [];
	(function() {
	  var hm = document.createElement("script");
	  hm.src = "//hm.baidu.com/hm.js?19f39b206aedf768b42fbc69e4e4f721";
	  var s = document.getElementsByTagName("script")[0]; 
	  s.parentNode.insertBefore(hm, s);
	})();
	</script>
</head>
<body>
	<div class="wrapper">
		<img src="/img/course.jpg" />
		<a data-spopup=".share-notice">
			<img src="/img/btn_enroll.png" />
			<img src="/img/btn_enroll_c.png" />
		</a>
		<img class="arrow" src="/img/d_arrow.png" alt="" />
	</div>
	
	<div class="popup-wrapper share-notice" <?php if($is_show != 1):?> style="display:none"<?php endif;?>>
		<div class="popup-bg" data-cpopup=".share-notice"></div>
		<div class="popup-layout" data-cpopup=".share-notice">
			<img class="share" src="/img/share_notice.png" />
		</div>
	</div>
	<script src="/js/zepto-1.1.6.js"></script>
	<script>
		Zepto(function ($) {
			$("a").on('touchstart', function (e) {
				e.preventDefault();
				$(this).addClass("active");
				if ($(".share-notice")) {
					$(".share-notice").show();
					$(".share-notice").siblings().addClass("disableClick");
				};
			}).on('touchend', function (e) {
				e.preventDefault();
				$(this).removeClass("active");
			});
			$(".share-notice").click(function (e) {
				e.preventDefault();
				if ($(".share-notice")) {
					$(".share-notice").hide();
					$(".share-notice").siblings().removeClass("disableClick");
				};
			});
		});
	</script>
	<?php if($device == 'wechat'):?>
	<script type="text/javascript">
    Zepto(function ($) {
        wx.config({
            debug: false,
            appId: '<?php echo $js_config['appId']?>',
            timestamp: <?php echo $js_config['timestamp']?>,
            nonceStr: '<?php echo $js_config['noncestr']?>',
            signature: '<?php echo $js_config['signature']?>',
            jsApiList: [
            	'onMenuShareTimeline',
            	'onMenuShareAppMessage'
            ]
        });
        wx.ready(function () {
        	wx.onMenuShareTimeline({
            	title: '<?php echo $share_content;?>',
        	    link: '<?php echo $share_url?>', // 分享链接
        	    imgUrl: 'http://wx.zhishimama.com/img/zshb.png', // 分享图标
        	    success: function () {
            	    window.location.href = "http://m.qlchat.com/topic/260000048027193.htm";
        	        // 用户确认分享后执行的回调函数
        	    },
        	    cancel: function () {
        	        // 用户取消分享后执行的回调函数
        	    }
        	});

        	wx.onMenuShareAppMessage({
            	title: '<?php echo $share_content?>',
        	    desc: '<?php echo $share_desc;?>', // 分享描述
        	    link: '<?php echo $share_url?>', // 分享链接
        	    imgUrl: 'http://wx.zhishimama.com/img/zshb.png', // 分享图标
        	    type: 'link', // 分享类型,music、video或link，不填默认为link
        	    dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
        	    success: function () {
        	        // 用户确认分享后执行的回调函数
        	    	window.location.href = "http://m.qlchat.com/topic/260000048027193.htm";
        	    },
        	    cancel: function () {
        	        // 用户取消分享后执行的回调函数
        	    }
        	});
        });
    })
	</script>
	<?php endif;?>
</body>
</html>
